package com.tree.thrive.business.common.po.domain.bo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.util.Objects;

/**
 * top-tree
 *
 * @Auther: cheng.tang
 * @Date: 2022/8/17 11:21 AM
 * @Description:
 */
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class KeyValueOverrideEqualsAndHashCodeBO {

    private String key;

    private String value;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        KeyValueOverrideEqualsAndHashCodeBO that = (KeyValueOverrideEqualsAndHashCodeBO) o;
        return Objects.equals(key, that.key) && Objects.equals(value, that.value);
    }

    @Override
    public int hashCode() {
        return Objects.hash(key, value);
    }
}
